
package monster;

import java.util.ArrayList;

/**
 *
 * @author dkimnach
 */
public class Tracker {

    private int totalEncs;
    private int encounter;
    private Monster current;
    private ArrayList<Monster> miniMon; // Boogen or Wolf
    private final int MINI_HEALTH = 30;
    private final int MINI_PRESTIGE = 1;

    public Tracker() {
        totalEncs = 9;
    }

    public Tracker(int enc) {
        totalEncs = enc;
    }

    // Blood mage adding new encounter to stack
    public int addEnc() {
        totalEncs++;
        return totalEncs;
    }

    private int addMinis(int num) {
        for (int i = 0; i < num; i++) {
            miniMon.add(new Monster(MINI_HEALTH, MINI_PRESTIGE));
        }
        return miniMon.size();
    }

    private int dmgMini(int index, int dmg) {
        int h = miniMon.get(index).damage(dmg);

        return h;
    }

    private int killMini(int index) {
        miniMon.remove(index);

        return miniMon.size();
    }

    // start monster minis = true if boogens or wolfpack
    public int beginEnc(int health, int prestige) {
        current = new Monster(health, prestige);
        miniMon = new ArrayList<Monster>();

        return encounter;
    }

    // kill monster
    public int endEnc() {
        encounter++;
        return encounter;
    }

    public int dmgEnc(int index, int dmg) {
        int h = current.damage(dmg);

        return h;
    }

    public int healEnc(int index, int heal) {
        int h = current.heal(heal);

        return h;
    }

    public int getEncounter() {
        return encounter;
    }

    public int getTotalEncs() {
        return totalEncs;
    }

    public Monster getCurrentEnc() {
        return current;
    }
}
